var menuArr=[{'icon':'icon025a2.gif','title':'新建角色','action':function(){
	alert("新增");
}},{'icon':'icon025a4.gif','title':'编辑角色','action':function(){
	alert("编辑");
}},{'icon':'icon025a3.gif','title':'删除角色','action':function(){
	alert("删除");
}}];
function createMenu(obj,top,left,menuArr){
	var menuHtml='<table cellspacing="1" cellpadding="0" border="0" style="border:1px solid #8F8F73;background:#FFFFFF;" id="_ContextMenu_Table"><tbody><tr><td>';
	for(var i=0;i<menuArr.length;i++){
		console.log(menuArr[i]['icon']);
		menuHtml+='<table width="100%" cellspacing="0" cellpadding="0" border="0" style="cursor:pointer;font-size:12px"><tbody><tr>';
		menuHtml+='<td width="24" valign="middle" height="22" align="center" style="background: none repeat scroll 0% 0% rgb(214, 223, 247);"><img width="20" vspace="1" hspace="2" height="20" src="/hrm/images/'+menuArr[i]['icon']+'"></td>';
		menuHtml+='<td nowrap="true" style="background: none repeat scroll 0% 0% rgb(247, 248, 253); padding-left: 10px; cursor: pointer;">'+menuArr[i]['icon']+'</td>';
		menuHtml+='<td width="15" style="background: none repeat scroll 0% 0% rgb(247, 248, 253); width: 15px; text-align: center;">&nbsp;</td>';
		menuHtml+='</tr></tbody></table>';
	}
	menuHtml+='</td></tr></tbody></table>';
	console.log(obj.offset().top);
	console.log(obj.offset().left);
	$(menuHtml).css({'position':'absolute','top':top,'left':left,"z-index":999}).appendTo($('body')).show();
	return $(menuHtml);
}

			

			